home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DTP / DTP_TEX / 2848F.ZIP / INPUTS2.ARC / BK11.DOC < prev    next >
Text File  |  1987-12-15  |  19KB  |  446 lines

  1. % BOOK DOCUMENT STYLE -- Released 9 June 1987
  2. %    for LaTeX version 2.09
  3. % Copyright (C) 1987 by Leslie Lamport
  4.  
  5. % PREPARING A FOREIGN LANGUAGE VERSION:
  6. %
  7. % This document style is for documents prepared in the English language.
  8. % To prepare a version for another language, various English words must
  9. % be replaced.  All the English words that required replacement are
  10. % indicated below, where we give the name of the command in which the
  11. % words appear, and the entire line containing the word(s), with the
  12. % actual words underlined.
  13. % \part:
  14. %       \huge\bf Part \thepart         %   THEN Print 'Part' and number
  15. %                ~~~~
  16. % \appendix:
  17. %   \def\@chapapp{Appendix}
  18. %                 ~~~~~~~~
  19.  
  20. %  ****************************************
  21. %  *               FONTS                  *
  22. %  ****************************************
  23. %
  24.  
  25. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  26. \normallineskip 1pt
  27. \def\baselinestretch{1}
  28.  
  29. % Each size-changing command \SIZE executes the command
  30. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  31. % where:
  32. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual 
  33. %                  value will be \baselinestretch * BASELINESKIP.)
  34. %
  35. %  \FONTSIZE     = Name of font-size command.  The currently available
  36. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  37. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  38. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  39. %  \@FONTSIZE    = The same as the font-size command except with an
  40. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  41. %                  \@FONTSIZE = \@xivpt.
  42. %
  43. % For reasons of efficiency that needn't concern the designer,
  44. % the document style defines \@normalsize instead of \normalsize .  This is
  45. % done only for \normalsize, not for any other size-changing commands.
  46.  
  47. \def\@normalsize{\@setsize\normalsize{13.6pt}\xipt\@xipt
  48. \abovedisplayskip 11pt plus3pt minus6pt%
  49. \belowdisplayskip \abovedisplayskip
  50. \abovedisplayshortskip  \z@ plus3pt%   
  51. \belowdisplayshortskip  6.5pt plus3.5pt minus3pt%
  52. \let\@listi\@listI}   % Setting of \@listi added 9 Jun 87
  53.  
  54. \def\small{\@setsize\small{12pt}\xpt\@xpt
  55. \abovedisplayskip 10pt plus2pt minus5pt%
  56. \belowdisplayskip \abovedisplayskip
  57. \abovedisplayshortskip  \z@ plus3pt%   
  58. \belowdisplayshortskip  6pt plus3pt minus3pt
  59. \def\@listi{\topsep 6pt plus 2pt minus 2pt\parsep 3pt plus 2pt minus 1pt
  60. \itemsep \parsep}}
  61.  
  62. \def\footnotesize{\@setsize\footnotesize{11pt}\ixpt\@ixpt
  63. \abovedisplayskip 8pt plus 2pt minus 4pt%
  64. \belowdisplayskip \abovedisplayskip
  65. \abovedisplayshortskip \z@ plus 1pt%
  66. \belowdisplayshortskip 4pt plus 2pt minus 2pt
  67. \def\@listi{\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
  68. \itemsep \parsep}}
  69.  
  70. \def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt}
  71. \def\tiny{\@setsize\tiny{7pt}\vipt\@vipt}
  72. \def\large{\@setsize\large{14pt}\xiipt\@xiipt}
  73. \def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
  74. \def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
  75. \def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
  76. \def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
  77.  
  78. \normalsize  % Choose the normalsize font.
  79.  
  80.  
  81. %  ****************************************
  82. %  *            PAGE LAYOUT               *
  83. %  ****************************************
  84. %
  85. % All margin dimensions measured from a point one inch from top and side
  86. % of page.  Dimensions shrink by about 2 percent
  87.  
  88. \oddsidemargin .25in      % Left margin on odd-numbered pages.
  89. \evensidemargin 1.25in      % Left margin on even-numbered pages.
  90.  
  91. \marginparwidth 1in    %   Width of marginal notes.
  92. \marginparsep 7pt        % Horizontal space between outer margin and 
  93.                          % marginal note
  94.  
  95.  
  96. % VERTICAL SPACING:        
  97.                          % Top of page:
  98. \topmargin .73in         %    Nominal distance from top of page to top of
  99.                          %    box containing running head.
  100. \headheight 12pt         %    Height of box containing running head.
  101. \headsep .275in          %    Space between running head and text.
  102. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  103.                          % Bottom of page:
  104. \footskip .38in          %    Distance from baseline of box containing foot 
  105.                          %    to baseline of last line of text.
  106.  
  107.  
  108. % DIMENSION OF TEXT:
  109. % 24 Jun 86: changed to explicitly compute \textheight to avoid roundoff.
  110. % The value of the multiplier was calculated as the floor of the
  111. % old \textheight minus \topskip, divided by \baselineskip for \normalsize.
  112. % The old value of \textheight was 530.4pt.
  113. % \textheight is the height of text (including footnotes and figures, 
  114. % excluding running head and foot).
  115.  
  116. \textheight = 38\baselineskip
  117. \advance\textheight by \topskip
  118. \textwidth 5in           % Width of text line.
  119.                          % For two-column mode: 
  120. \columnsep 10pt          %    Space between columns 
  121. \columnseprule 0pt       %    Width of rule between columns.
  122.  
  123. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  124. % natural height instead of being stretched to exactly \textheight.
  125.  
  126. % FOOTNOTES:
  127.  
  128. \footnotesep 7.7pt    % Height of strut placed at the beginning of every
  129.                       % footnote = height of normal \footnotesize strut,
  130.                       % so no extra space between footnotes.
  131.  
  132. \skip\footins 10pt plus 4pt minus 2pt  % Space between last line of text and 
  133.                                        % top of first footnote.
  134.  
  135. % FLOATS: (a float is something like a figure or table)
  136. %
  137. %  FOR FLOATS ON A TEXT PAGE:
  138. %
  139. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  140. \floatsep 12pt plus 2pt minus 2pt        % Space between adjacent floats moved
  141.                                          % to top or bottom of text page.
  142. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  143.                                          % at top or bottom of page.
  144. \intextsep 12pt plus 2pt minus 2pt       % Space between in-text figures and 
  145.                                          % text.
  146. \@maxsep 20pt                            % The maximum of \floatsep, 
  147.                                          % \textfloatsep and \intextsep (minus
  148.                                          % the stretch and shrink).
  149. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  150. \dblfloatsep 12pt plus 2pt minus 2pt     % Same as \floatsep for double-column
  151.                                          % figures in two-column mode.
  152. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column 
  153.                                          % floats.
  154. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and 
  155.                                          % \dbltexfloatsep.
  156.  
  157. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  158. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  159. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be    
  160.                          % 0pt plus ...)                                    
  161. \@fpsep 8pt plus 2fil    % Space between floats on float page/column.       
  162. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be 
  163.                          % 0pt plus ... )                                   
  164.  
  165. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  166. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  167. \@dblfpsep 8pt plus 2fil % Space between floats on float page.
  168. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be 
  169.                          % 0pt plus ... )                                   
  170. % MARGINAL NOTES:
  171. %
  172. \marginparpush 5pt       % Minimum vertical separation between two marginal 
  173.                          % notes.
  174.  
  175.  
  176. %  ****************************************
  177. %  *           PARAGRAPHING               *
  178. %  ****************************************
  179. %
  180. \parskip 0pt plus 1pt              % Extra vertical space between paragraphs.
  181. \parindent 17pt                    % Width of paragraph indentation.
  182. %\topsep 9pt plus 3pt minus 5pt    % Extra vertical space, in addition to 
  183.                                    % \parskip, added above and below list and
  184.                                    % paragraphing environments.
  185. \partopsep 3pt plus 1pt minus 2pt  % Extra vertical space, in addition to 
  186.                                    % \parskip and \topsep, added when user
  187.                                    % leaves blank line before environment.
  188. %\itemsep 4.5pt plus 2pt minus 1pt % Extra vertical space, in addition to
  189.                                    % \parskip, added between list items.
  190. % See \@listI for values of \topsep and \itemsep
  191. % (Change made 9 Jun 87)
  192.  
  193. % The following page-breaking penalties are defined
  194.  
  195. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  196. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  197. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  198.  
  199. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  200. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  201. \@itempenalty     -\@lowpenalty    % Between list items.
  202.  
  203. % \clubpenalty         % 'Club line'  at bottom of page.
  204. % \widowpenalty        % 'Widow line' at top of page.
  205. % \displaywidowpenalty % Math display widow line.
  206. % \predisplaypenalty   % Breaking before a math display.
  207. % \postdisplaypenalty  % Breaking after a math display.
  208. % \interlinepenalty    % Breaking at a line within a paragraph.
  209. % \brokenpenalty       % Breaking after a hyphenated line.
  210.  
  211.  
  212. %    ****************************************
  213. %    *        CHAPTERS AND SECTIONS         *
  214. %    ****************************************
  215. %
  216.  
  217. \def\part{\cleardoublepage   % Starts new page.
  218.    \thispagestyle{plain}     % Page style of part page is 'plain'
  219.   \if@twocolumn              % IF two-column style
  220.      \onecolumn              %  THEN \onecolumn
  221.      \@tempswatrue           %       @tempswa := true
  222.     \else \@tempswafalse     %  ELSE @tempswa := false
  223.   \fi                        % FI
  224.   \hbox{}\vfil               % Add fil glue to center title  
  225.   \bgroup  \centering        % BEGIN centering
  226.   \secdef\@part\@spart}     
  227.  
  228.  
  229. \def\@part[#1]#2{\ifnum \c@secnumdepth >-2\relax  % IF secnumdepth > -2
  230.         \refstepcounter{part}                     %   THEN step part counter
  231.         \addcontentsline{toc}{part}{\thepart      %        add toc line
  232.         \hspace{1em}#1}\else                      %   ELSE add unnumbered line
  233.         \addcontentsline{toc}{part}{#1}\fi        % FI
  234.    \markboth{}{}
  235.     \ifnum \c@secnumdepth >-2\relax  % IF secnumdepth > -2
  236.       \huge\bf Part \thepart         %   THEN Print 'Part' and number
  237.     \par                             %         in \huge bold.
  238.     \vskip 20pt \fi                  %        Add space before title.
  239.     \Huge \bf                        % FI
  240.     #1\@endpart}                     % Print Title in \Huge bold.
  241.     
  242.     
  243. % \@endpart finishes the part page
  244. %
  245. \def\@endpart{\par\egroup     % END centering 
  246.    \vfil\newpage              % End page with 1fil glue.
  247.    \if@twoside                % IF twoside printing
  248.        \hbox{}                %   THEN Produce totally blank page
  249.        \thispagestyle{empty}  
  250.        \newpage        
  251.    \fi                        % FI
  252.    \if@tempswa                % IF @tempswa = true       
  253.      \twocolumn               %   THEN \twocolumn 
  254.    \fi}                       % FI
  255.  
  256. \def\@spart#1{\Huge \bf                      % Print title in \huge boldface
  257.    #1\@endpart}
  258.  
  259.  
  260. % \@makechapterhead {TEXT} : Makes the heading for the \chapter command.
  261. %
  262.  
  263. \def\@makechapterhead#1{             % Heading for \chapter command
  264.   \vspace*{50pt}                     % Space at top of text page.
  265.   { \parindent 0pt \raggedright 
  266.     \ifnum \c@secnumdepth >\m@ne     % IF secnumdepth > -1 THEN
  267.       \huge\bf \@chapapp{} \thechapter % Print 'Chapter' and number.
  268.     \par 
  269.     \vskip 20pt \fi                    % Space between number and title.
  270.     \Huge \bf                        % Title.
  271.     #1\par 
  272.     \nobreak                         % TeX penalty to prevent page break.
  273.     \vskip 40pt                      % Space between title and text.
  274.   } }
  275.  
  276. % \@makeschapterhead {TEXT} : Makes the heading for the \chapter* command.
  277. %
  278.  
  279. \def\@makeschapterhead#1{             % Heading for \chapter* command
  280.   \vspace*{50pt}                     % Space at top of page.
  281.   { \parindent 0pt \raggedright 
  282.     \Huge \bf                        % Title.
  283.     #1\par 
  284.     \nobreak                         % TeX penalty to prevent page break.
  285.     \vskip 40pt                      % Space between title and text.
  286.   } }
  287.  
  288. % \secdef{UNSTARCMDS}{STARCMDS} :
  289. %    When defining a \chapter or \section command without using
  290. %    \@startsection, you can use \secdef as follows:
  291. %       \def\chapter { ... \secdef \CMDA \CMDB }
  292. %       \def\CMDA    [#1]#2{ ...   % Command to define \chapter[...]{...}
  293. %       \def\CMDB    #1{ ...       % Command to define \chapter*{...}
  294.  
  295. \def\chapter{\cleardoublepage  % Starts new right-hand page.
  296.    \thispagestyle{plain}     % Page style of chapter page is 'plain'
  297.    \global\@topnum\z@        % Prevents figures from going at top of page.
  298.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  299.    \secdef\@chapter\@schapter}   % to \@afterindenttrue to have indent.
  300.  
  301. \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
  302.         \refstepcounter{chapter}
  303.         \typeout{\@chapapp\space\thechapter.}
  304.         \addcontentsline{toc}{chapter}{\protect
  305.         \numberline{\thechapter}#1}\else
  306.       \addcontentsline{toc}{chapter}{#1}\fi
  307.    \chaptermark{#1}
  308.    \addtocontents{lof}{\protect\addvspace{10pt}} % Adds between-chapter space
  309.    \addtocontents{lot}{\protect\addvspace{10pt}} % to lists of figs & tables.
  310.    \if@twocolumn                                 % Tests for two-column mode.  
  311.            \@topnewpage[\@makechapterhead{#2}]  
  312.      \else \@makechapterhead{#2}
  313.            \@afterheading                  % Routine called after chapter and
  314.      \fi}                                  % section heading.
  315.  
  316. \def\@schapter#1{\if@twocolumn \@topnewpage[\@makeschapterhead{#1}]
  317.         \else \@makeschapterhead{#1} 
  318.               \@afterheading\fi}
  319.  
  320. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE} 
  321. %            optional * [ALTHEADING]{HEADING}
  322. %    Generic command to start a section.  
  323. %    NAME       : e.g., 'subsection'
  324. %    LEVEL      : a number, denoting depth of section -- e.g., chapter=1,
  325. %                 section = 2, etc.  A section number will be printed if
  326. %                 and only if LEVEL < or = the value of the secnumdepth
  327. %                 counter.
  328. %    INDENT     : Indentation of heading from left margin
  329. %    BEFORESKIP : Absolute value = skip to leave above the heading.  
  330. %                 If negative, then paragraph indent of text following 
  331. %                 heading is suppressed.
  332. %    AFTERSKIP  : if positive, then skip to leave below heading,
  333. %                       else - skip to leave to right of run-in heading.
  334. %    STYLE      : commands to set style
  335. %  If '*' missing, then increments the counter.  If it is present, then
  336. %  there should be no [ALTHEADING] argument.  A sectioning command
  337. %  is normally defined to \@startsection + its first six arguments.
  338.  
  339. \def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus 
  340.     -.2ex}{2.3ex plus .2ex}{\Large\bf}}
  341. \def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus 
  342.    -.2ex}{1.5ex plus .2ex}{\large\bf}}
  343. \def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus
  344.  -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
  345. \def\paragraph{\@startsection
  346.      {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}}
  347. \def\subparagraph{\@startsection
  348.      {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus 
  349.      .2ex}{-1em}{\normalsize\bf}}
  350.  
  351. % Default initializations of \...mark commands.  (See below for their
  352. % us in defining page styles.
  353. %
  354.  
  355. \def\chaptermark#1{}
  356. % \def\sectionmark#1{}           % Preloaded definitions
  357. % \def\subsectionmark#1{}
  358. % \def\subsubsectionmark#1{}
  359. % \def\paragraphmark#1{}
  360. % \def\subparagraphmark#1{}
  361.  
  362. % The value of the counter secnumdepth gives the depth of the
  363. % highest-level sectioning command that is to produce section numbers.
  364. %
  365.  
  366. \setcounter{secnumdepth}{2}
  367.  
  368. % APPENDIX
  369. %
  370. % The \appendix command must do the following:
  371. %    -- reset the chapter counter to zero
  372. %    -- set \@chapapp to Appendix (for messages)
  373. %    -- redefine the chapter counter to produce appendix numbers
  374. %    -- reset the section counter to zero
  375. %    -- redefine the \chapter command if appendix titles and headings are
  376. %       to look different from chapter titles and headings.
  377.  
  378. \def\appendix{\par
  379.   \setcounter{chapter}{0}
  380.   \setcounter{section}{0}
  381.   \def\@chapapp{Appendix}
  382.   \def\thechapter{\Alph{chapter}}}
  383.  
  384.  
  385. %    ****************************************
  386. %    *                LISTS                 *
  387. %    ****************************************
  388. %
  389.  
  390. % The following commands are used to set the default values for the list
  391. % environment's parameters. See the LaTeX manual for an explanation of
  392. % the meanings of the parameters.  Defaults for the list environment are
  393. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  394. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  395. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  396. % called for a third-level list.)  By convention, \@listK should set
  397. % \leftmargin to \leftmarginK.
  398. %
  399. % For efficiency, level-one list's values are defined at top level, and
  400. % \@listi is defined to set only \leftmargin.
  401.  
  402. \leftmargini 2.5em
  403. \leftmarginii 2.2em     % > \labelsep + width of '(m)'
  404. \leftmarginiii 1.87em   % > \labelsep + width of 'vii.'
  405. \leftmarginiv 1.7em     % > \labelsep + width of 'M.'
  406. \leftmarginv 1em
  407. \leftmarginvi 1em
  408.  
  409. \leftmargin\leftmargini
  410. \labelsep .5em
  411. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  412. %\parsep 4.5pt plus 2pt minus 1pt  %(Removed 9 Jun 87)
  413.  
  414. % \@listI defines top level and \@listi values of
  415. % \leftmargin, \topsep, \parsep, and \itemsep
  416. % (Added 9 Jun 87)
  417. \def\@listI{\leftmargin\leftmargini \parsep 4.5pt plus 2pt minus 1pt%
  418. \topsep 9pt plus 3pt minus 5pt%
  419. \itemsep 4.5pt plus 2pt minus 1pt}
  420.  
  421. \let\@listi\@listI
  422. \@listi 
  423.  
  424. \def\@listii{\leftmargin\leftmarginii
  425.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  426.    \topsep 4.5pt plus 2pt minus 1pt
  427.    \parsep 2pt plus 1pt minus 1pt
  428.    \itemsep \parsep}
  429.  
  430. \def\@listiii{\leftmargin\leftmarginiii
  431.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  432.     \topsep 2pt plus 1pt minus 1pt 
  433.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  434.     \itemsep \topsep}
  435.  
  436. \def\@listiv{\leftmargin\leftmarginiv
  437.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  438.  
  439. \def\@listv{\leftmargin\leftmarginv
  440.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  441.  
  442. \def\@listvi{\leftmargin\leftmarginvi
  443.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  444.  
  445.